package cn.antblog.thread;

/**
 * @author YangJingyi
 * @date 2021-12-03 16:03
 */
public class Demo {


    public static void main(String[] args) {
        ping();
    }

    private static void ping() {
        Thread thread = new Thread() {
            public void run() {
                pong();
            }
        };
        thread.run();
        System.out.println("ping");
    }

    private static void pong() {
        System.out.println("pong");
    }
}
